public class Node {
    //Instance Variables
    private Object element;
    private Node next;

    //Constructors
    public Node(){
        this(null,null);
    }

    public Node(Object e,Node n){
        element=e;
        next=n;
    }

    //Accessor methods
    public Object getElement(){
        return element;
    }

    public Node getNext(){
        return next;
    }

    //Modifer methods
    public void setElement(Object newElem){
        element=newElem;
    }

    public void setNext(Node newNext){
        next=newNext;
    }
}//end of class Node
